// C1 E17

#include <stdio.h>

#define MAXLINE 1000
#define LONGS 80

int getstr(char s[], int lim);
// void copystr(char source[], char dest[]);

int main()
{
    int len;
    char s[MAXLINE];

    len = 0;

    while ((len = getstr(s, MAXLINE)) >= 0)
    {
        if (len >= LONGS)
            printf("\n>>> Length = %d\n%s", len, s);
    }
}

int getstr(char s[], int lim)
{
    int c;
    int i;

    i = 0;
    lim = MAXLINE;

    while (i < lim - 1 && (c = getchar()) != EOF && c != '\n')
    {
        s[i] = c;
        i++;
    }
    if (c == '\n')
        s[i] = '\n',
        i++;
    s[i] = '\0';

    return i;
}